package gui;

import java.awt.Dimension;

import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JProgressBar;

/**
 * @author Stephan
 * 
 */
@SuppressWarnings("serial")
public class ProgressDialog extends JDialog
{

	/**
	 * 
	 */
	private JProgressBar progress;

	/**
	 * 
	 */
	@SuppressWarnings("unused")
	private int time;

	/**
	 * @param time
	 *            asdfa
	 */
	public ProgressDialog(int time)
	{
		super();
		this.setModal(true);

		JPanel panel = new JPanel();
		progress = new JProgressBar(0, 100);
		progress.setIndeterminate(true);
		panel.add(progress);
		this.time = time;
		this.setSize(new Dimension(100, 100));
		this.getContentPane().add(panel);
		this.setVisible(true);
		run();
	}

	/**
	 * 
	 */
	public void kill()
	{
		this.dispose();
	}

	/**
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Runnable#run()
	 */
	public void run()
	{

		kill();
	}

}
